import { createWebHistory, createRouter } from 'vue-router'

const routes = [
	{ path: '/login', component: () => import('@/views/Login/index.vue') },
	{
		path: '/',
		component: () => import('@/components/Layout/index.vue'),
		children: [
			{ path: 'ticketSearch', component: () => import('@/views/TicketSearch/index.vue') },
			{ path: 'userInfo', component: () => import('@/views/UserInfo/index.vue') },
			{ path: 'passenger', component: () => import('@/views/Passenger/index.vue') },
			{ path: 'ticketList', component: () => import('@/views/TicketList/index.vue') },
			{ path: 'personalTicket', component: () => import('@/views/PersonalTicket/index.vue') },
		]
	}
]

const router = createRouter({
	history: createWebHistory(),
	routes
})

export default router